// interface 描述一个对象的形状
/**
 * @interface School 定义一个学校所需要的参数
 */
interface School {
  readonly name: String //只读属性
  adress?: String,//可填可不填写
  age: Number,
  // [sss: string]:any
}

const Stu: School = {
  name,
  age: 1
}

//接口扩展
interface CGZ extends School {
  type: string
  [key: string]: any
}

let Stu2: CGZ = {
  ...Stu,
  type: '前端',
  a: 1
}

// 类型断言
let WZ: School = {
  name: '232323232',
  adress: '1322323',
  age: 22223,
  lesss: ['323232', '43434']
} as School